<template>
  <div>
      <van-tabbar  v-model="active" fixed>
 <van-tabbar-item icon="wap-home-o" @click="home" >首页</van-tabbar-item>
  <van-tabbar-item icon="label-o" dot @click="classify" >分类</van-tabbar-item>
  <van-tabbar-item icon="hot-sale-o" badge="5" @click="beworthbuying" >值得买</van-tabbar-item>
 <van-tabbar-item icon="cart-o" @click="cart" >购物车</van-tabbar-item>
  <van-tabbar-item icon="user-o" badge="20" @click="center" >个人</van-tabbar-item>
</van-tabbar>
  </div>
</template>

<script>
export default {
    name:'Tabbar',
    data(){
        return{
            active:0,
        }
    },
    methods:{
        home(){
            this.$router.push({
                path: "home"
            });
            
        },
        classify(index){
            this.$router.push({
                path: "classify"
            });
           
        },
        beworthbuying(){
            this.$router.push({
                path: "beworthbuying"
            });
        },
        cart(){
            this.$router.push({
                path: "cart"
            });
        },
        center(){
             this.$router.push({
                path: "center"
            });
        }
    }
}
</script >

<style lang="less" scoped>
@tabbar-height:180px;
</style>